package com.ctosb.classviewer.clazz.cp;

import com.ctosb.classviewer.ClassReader;
import com.ctosb.classviewer.clazz.ClassFile;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class CONSTANT_Long_info extends Cp_info {

    private int high_bytes;
    private int low_bytes;

    @Override
    protected void doParse(ClassReader classReader) {
        high_bytes = classReader.readInt();
        low_bytes = classReader.readInt();
    }

    /**
     * 获取值
     * @Author alan
     * @Date 2020/12/13 10:09 下午
     * @param classFile
     * @return
     */
    public long getValue(ClassFile classFile) {
        return high_bytes << 32 + low_bytes;
    }
}
